import { Controller, Get, Req } from '@nestjs/common';
import { AppService } from './app.service';

@Controller()
export class AppController {
  constructor(private readonly appService: AppService) { }
  // 健康检查
  @Get('/health')
  async getHello() {
    // 可以在这里实现各种健康检查逻辑
    const str = await this.appService.getHello()
    return str
  }

  @Get('/admin')
  async renderDefault() {
    //渲染主页
    const str = await this.appService.renderHome()
    return str
  }

  @Get('/admin/team1')
  async renderApp1() {
    const str = await this.appService.renderApp1()
    return str
  }

  @Get('/admin/team2')
  async renderApp2() {
    const str = await this.appService.renderApp2()
    return str
  }
}